/*
 * Copyright (C) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the 'License');
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an 'AS IS' BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef IMAGE_KNIFE_C_KEKE_PIXELMAP_API_H
#define IMAGE_KNIFE_C_KEKE_PIXELMAP_API_H

#include "api_base.h"
#include <multimedia/image_framework/image/pixelmap_native.h>

namespace ImageKnifePro {
class PixelmapApi : public ApiBase {
public:
    explicit PixelmapApi();

    typedef Image_ErrorCode (*GetAllocationByteCount) (OH_PixelmapNative *pixelmap, uint32_t *allocationByteCount);
    typedef Image_ErrorCode (*SetMemoryName) (OH_PixelmapNative *pixelmap, char *name, size_t *size);
    typedef Image_ErrorCode (*CreatePixelmapUsingAllocator)(uint8_t *data, size_t dataLength,
        OH_Pixelmap_InitializationOptions *options, IMAGE_ALLOCATOR_MODE allocator, OH_PixelmapNative **pixelmap);

    CreatePixelmapUsingAllocator GetCreatePixelmapUsingAllocator();
    GetAllocationByteCount GetApiGetAllocationByteCount();
    SetMemoryName GetApiSetMemoryName();
};
}

#endif //IMAGE_KNIFE_C_KEKE_PIXELMAP_API_H
